package com.yanqu.road.server.cmd.banquet;

import com.yanqu.road.entity.banquet.UserBanquetData;
import com.yanqu.road.pb.banquet.BanquetProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.banquet.BanquetMgr;
import com.yanqu.road.server.pb.BanquetPb;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

import java.util.Map;

//@Cmd(code = Protocol.S_BANQUET_GET_REWARD, desc = "獲取自己開啟的宴會的獎勵")
public class GetBanquetRewardCmd extends AbstractCommand {

	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {

	}

	@Override
	public void sendData(GamePlayer player) {
		Map<String, UserBanquetData> userBanquetDataMap = BanquetMgr.getOverBanquetReward(player);
		BanquetProto.BanquetGetRewardResp.Builder respMsg = BanquetPb.parseBanquetGetRewardResp(userBanquetDataMap);
		respMsg.setRet(ret);
		player.sendPacket(Protocol.U_BANQUET_GET_REWARD, respMsg);
	}

}
